package jp.jig.test.alarm;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class WakeUpActivity extends Activity {


	Button mWakeUpButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);



		setContentView(R.layout.wake_up_activity);

		mWakeUpButton = (Button)findViewById(R.id.wake_up_activity_wake_up_button);
		mWakeUpButton.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				int id = v.getId();
				if(id == R.id.wake_up_activity_wake_up_button){
					AlarmService.stopTweetTimer(getApplicationContext());
					finish();
				}
			}
		});
	}

	public static void startActivityWithSound(Context context) {
		Intent i = new Intent(context, WakeUpActivity.class);
		i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		context.startActivity(i);
	}

}
